package com.atstudy.servlet;

import com.atstudy.entites.Account;
import com.atstudy.service.AccountServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2023/1/30 16:18
 * @copyright: 博为峰
 */
@WebServlet("/account")
public class AccountServlet extends BaseServlet {

    public String list(HttpServletRequest req, HttpServletResponse resp) {
        AccountServiceImpl accountService = new AccountServiceImpl();
        List<Account> accountList = accountService.getAccountList();
        req.setAttribute("accountList", accountList);
        return "forward:/WEB-INF/account/list.jsp";
    }
}
